import React, { FC } from 'react';
import { LeftOutline } from 'antd-mobile-icons';
import './style.css';

interface TabBarProps {
    goBack: () => void;
    regText: string;
    cenText: string;
}

// TabBar组件
const TabBar: FC<TabBarProps> = props => {
    const { goBack, regText, cenText } = props;
    return (
        <div className='tab-bar'>
            <span className='btn' onClick={e => goBack && goBack()}>
                <LeftOutline />
            </span>
            <span className='reg'>{regText}</span>
            <span className='deliver'>|</span>
            <span className='cen'>{cenText}</span>
        </div>
    )

}

export default TabBar;
